home *** CD-ROM | disk | FTP | other *** search
/ Skunkware 5 / Skunkware 5.iso / src / X11 / wais / waisgate / README < prev    next >
Text File  |  1995-05-09  |  10KB  |  243 lines

  1.  
  2. This directory contains the HyperText server (httpd ) required 
  3. set up an XMosaic hyper-node to serve hyper text documents to 
  4. users of XMosaic.
  5.  
  6. There are several ways to get httpd installed on your machine 
  7.  
  8. The easy way : 
  9.     get the custom installable floppy, type custom.
  10.     This disk image is called "01"
  11.  
  12. The hard way : 
  13.     get the compressed tar file of binaries and config files, 
  14.     add your own /etc/services , /etc/inetd.conf entries.
  15. /etc/services:http            80/tcp
  16. /etc/inetd.conf:http stream tcp nowait nouser /usr/local/etc/httpd httpd
  17.     This tar file is called 
  18.     httpd.tar.Z
  19.  
  20. The hard core way: 
  21.     get the srcs, type imake; make; ( compile your own ).
  22.     This way is called 
  23.     httpd-src.tar.Z
  24.  
  25. These files are in the current directory.
  26.  
  27. Details of rules file configuration follow.
  28.  
  29. Have fun, 
  30. hess@sco.com
  31.  
  32. ============ /usr/local/etc/httpd.conf file format ==========
  33.                                                                    
  34. The Rule File
  35.  
  36.    The rule file defines how the WWW software will translate a request
  37.    into an document name.   For a server, it allows one to provide an
  38.    extra level of  name mapping above that given by links in the file
  39.    system. It allows, for example, out of date names to mapped onto
  40.    their more recent counterparts.
  41.    
  42.    For the client, it allows access to certain servers to be remapped
  43.    for example caching servers, or to local copies of the same
  44.    information.
  45.    
  46.    The rule file also allows access to be restricted.  This is
  47.    essential, to prevent, for example, unauthorized access to your
  48.    password file.
  49.    
  50.    By default, the rule file /usr/local/etc/httpd.conf is loaded, unless
  51.    specified otherwise with the -R or -r options . 
  52.    
  53.    See example rule files , Old format for software before 2.0 
  54.    
  55.   FORMAT
  56.   
  57.    Each line consists of an operation code and one or two parameters,
  58.    referred to as the template and the result. Anything on a line
  59.    after and including a hash sign (#) is ignored, as are empty lines.
  60.    
  61.    The server uses the top rule first, then EACH SUCCESSIVE RULE 
  62.    unless told otherwise.  The operation codes are as follows 
  63.    
  64.   map template result     If the address matches the template, use the
  65.                          result string from now on for future rules. 
  66.                          
  67.   pass template           If the address maches the template, use it
  68.                          as it is, porocessing no further rules. 
  69.                          
  70.   fail template           If the address matches the template,
  71.                          prohibit access, processing no futher rules. 
  72.                          
  73.    The template string may contain at most one wildcard asterisk
  74.    ("*"). The result string may have one wildcard only if the template
  75.    has one.
  76.    
  77.    When matching, 
  78.    
  79.       Rules are scanned from the top of the file to the bottom. 
  80.       
  81.       If a request matches a "map" template exactly, the result string
  82.       is used instead of the original string and applied to successive
  83.       rules. 
  84.       
  85.       If the request maches a "map" template with wildcard, then the
  86.       text of the request which matches the wildcard is inserted in
  87.       place of the wildcard in the result string to form the
  88.       translated request. If the result string has no wildcard, it is
  89.       used as it is. 
  90.       
  91.       When a substitution takes place, the rule scan continues with
  92.       the next rule using the new string in place of the request. 
  93.       
  94.                                                                Tim BL 
  95.                                                                       
  96.   RULE FILE EXAMPLES
  97.   
  98. A basic rule file for the http daemon might look like this (it looked 
  99.                                        different before version 2.0): 
  100.                                                                       
  101.  
  102. map    /          /welcome.html
  103. map    /*         file:/u/john/public/*
  104. pass   file:/u/john/public/*
  105. fail   *
  106.  
  107. The first line maps the root document onto a specific document about t
  108.                                                             he server.
  109.                                                                       
  110. The second line maps all document names onto filenames in a particular
  111.                                                             directory.
  112.                                                                       
  113.       The third line allows access to all documenst in that directory.
  114.                                                                       
  115. The fouth line disallows access to all other documents. (There won't b
  116. e in any in this case because of the mapping, but its wise to put in f
  117.                                                            or later). 
  118.                                                                       
  119.     Second example
  120.     
  121.  
  122. map    /            /tnotes/welcome.html
  123. map    /tnotes/*    file:/u/john/public/*
  124. map    /seminars/*  file:/u/jane/seminars/*
  125. pass   file:/u/john/public/*
  126. pass   file:/u/jane/seminars/*.html
  127. fail   *
  128.  
  129. The first line maps the root document onto a specific document about t
  130.                                            he server. (See etiquette )
  131.                                                                       
  132. The second line maps all document names starting with /tnote/ onto fil
  133. enames in a particular directory where john maintains the technical no
  134. tes. If someone else takes over the technical notes, we can change thi
  135. s. Here we are starting to distinguish between document names and file
  136.  names. This can be carried much further if necessary, but one level o
  137. f mapping is enough to allow for changes of administration of differen
  138.                                                               t areas.
  139.                                                                       
  140. The third line separately maps the seminar information into Jane's dir
  141.                                                                ectory.
  142.                                                                       
  143. The third and fourth line enable access to anything in John's "public"
  144.  directory, and any .html file in Jane's "seminar" directory tree. Not
  145. e here that the * maps to any sequence INCLUDING SLASHES so all files 
  146. in any subdirectory of /u/jane/seminars will be enabled so long as the
  147.                                                        y end in .html.
  148.                                                                       
  149. The bottom line will pick up for example any attempt to use the server
  150.                to access non-html files in Jane's seminars directory. 
  151.                                                                       
  152.     Configuration file for a WAIS gateway
  153.     
  154. The httpd daemon can be used as a WAIS gateay if it has been compiled 
  155. with the necessary options and linked with the freeWAIS software. A su
  156.                                          itable configuration file is 
  157.                                                                       
  158. map     /*              wais://*
  159. pass    wais://*
  160. fail    *
  161.  
  162.  
  163.  
  164.  
  165.  
  166. ============================= 
  167. Server Command LineThe command line syntax for the
  168.  
  169.  basic www server allows a number of options
  170. and an optional directory argument.
  171.                         httpd  [options] [directory]
  172.  
  173. The directory argument, if present,
  174. indicates the directory to be exported.
  175. (Version 2.0 and later only.)  If
  176. not present, either a rule file is
  177. be used, to export combinations of
  178. directories, or else the default
  179. is to export the "/Public" directory
  180. tree.
  181.  
  182.   EXAMPLES
  183.   
  184.                         httpd -p 80  -dyt /ftp/pub
  185.  
  186. This exports the entire /ftp/pub
  187. tree with browsable directories and
  188. README files included at the top
  189. of directory listings.
  190.                         httpd
  191.  
  192. This comamnd in the inetd configuration
  193. file inetd.conf exports the /Public
  194. directory tree.  This tree may contain
  195. soft links to other directory trees.
  196.  
  197.   -dn                     Disable directory browsing. An attempt to
  198.                          access a directory will generate an error
  199.                          response. 
  200.                          
  201.   -dy                     Enable direcory browsing.  Directories are
  202.                          returned as hypertext documents. See browsing
  203.                          directories . 
  204.                          
  205.   -ds                     Enable directory browsing only for
  206.                          directories containing a file named
  207.                          ".www_browsable". This is the default. 
  208.                          
  209.   -dt                     For any browsable directory which contains a
  210.                          README file, include the text of the README
  211.                          file at the top of the document before the
  212.                          listing. This is the default. 
  213.                          
  214.   -db                     As -dt but put the README at the bottom,
  215.                          after the listing.  The -db and -dt options
  216.                          may be combined with -dy as -dyb, -dty etc. 
  217.                          
  218.   -dr                     Disables the README inclusion feature . 
  219.                          
  220.   -l  file                Log all calls to the given file. The file is
  221.                          appended to if it already exists. 
  222.                          
  223.   -p port                 Specify the port number. If this option is
  224.                          not given, the daemon assumes that it has
  225.                          been run by inetd, and uses stdin and stdout
  226.                          as its communication channel . Note that port
  227.                          numbers under 1024 are privileged . 
  228.                          
  229.   -v                      Verbose mode. Copious trace messages are
  230.                          written to the standard output stream. Mainly
  231.                          for debugging. 
  232.                          
  233.   -r file                 Load a rule file . The rules are added after
  234.                          any rules already loaded.  Inhibits the
  235.                          loading of the default rule file. 
  236.                          
  237.   -R                      Inhibit the loading of the default rule
  238.                          file.  Warning: running without a rule file 
  239.                          normally poses a security problem. 
  240.   
  241.                                                                Tim BL 
  242.                                                                       
  243.